package cn.cai.pethome.pet.mapper;

import cn.cai.pethome.pet.domain.Pet;
import cn.cai.pethome.base.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xiaocai
 * @since 2022-09-10
 */
@Component
public interface PetMapper extends BaseMapper<Pet> {

    /**
     * 根据petIds查询数据t_pet表
     * @param petIds
     * @return
     */
    List<Pet> loadBatchIds(List<Long> petIds);

    /**
     * 批量修改宠物状态 把t_pet表state状态修改为2
     * @param petIds
     * @param state
     */
    void updateBatchState(@Param("petIds") List<Long> petIds, @Param("state") Integer state);
}
